package o2o.thridpost.dada.client;

import lombok.Getter;
import lombok.Setter;

/**
 * Created with IntelliJ IDEA.
 *
 * @author sunyufan deporation@qq.com
 * @date 2021/4/30 11:59
 * @description: DadaApiResponse
 */
@Setter
@Getter
public class DadaApiResponse {

    private static final int STATUS_CODE = -2;

    private final static String STATUS_MSG = "请求超时异常";

    private String status;

    private int code;

    private String msg;

    private Object result;

    public static DadaApiResponse except() {
        DadaApiResponse apiResponse = new DadaApiResponse();
        apiResponse.setCode(STATUS_CODE);
        apiResponse.setMsg(STATUS_MSG);
        return apiResponse;
    }

    @Override
    public String toString() {
        return "DadaApiResponse{" +
                "status='" + status + '\'' +
                ", code=" + code +
                ", msg='" + msg + '\'' +
                ", result=" + result +
                '}';
    }
}
